import config from '@/config'
import http from '@/utils/request'

export default {
  menu: {
    myMenus: {
      url: `${config.API_URL}/system/menu/my/1.6.1`,
      name: '获取我的菜单',
      get: async function () {
        return {
          code: 200,
          data: {
            menu: [
              {
                name: 'home',
                path: '/home',
                meta: {
                  title: '首页',
                  icon: 'el-icon-eleme-filled',
                  type: 'menu'
                },
                children: [
                  {
                    name: 'dashboard',
                    path: '/dashboard',
                    meta: {
                      title: '控制台',
                      icon: 'el-icon-menu',
                      affix: true
                    },
                    component: 'home'
                  },
                  {
                    name: 'userCenter',
                    path: '/usercenter',
                    meta: {
                      title: '帐号信息',
                      icon: 'el-icon-user',
                      tag: 'NEW'
                    },
                    component: 'userCenter'
                  }
                ]
              },
              {
                name: 'vab',
                path: '/vab',
                meta: {
                  title: '组件',
                  icon: 'el-icon-takeaway-box',
                  type: 'menu'
                },
                children: [
                  {
                    path: '/vab/mini',
                    name: 'minivab',
                    meta: {
                      title: '原子组件',
                      icon: 'el-icon-magic-stick',
                      type: 'menu'
                    },
                    component: 'vab/mini'
                  },
                  {
                    path: '/vab/iconfont',
                    name: 'iconfont',
                    meta: {
                      title: '扩展图标',
                      icon: 'el-icon-orange',
                      type: 'menu'
                    },
                    component: 'vab/iconfont'
                  },
                  {
                    path: '/vab/data',
                    name: 'vabdata',
                    meta: {
                      title: 'Data 数据展示',
                      icon: 'el-icon-histogram',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: '/vab/chart',
                        name: 'chart',
                        meta: {
                          title: '图表 Echarts',
                          type: 'menu'
                        },
                        component: 'vab/chart'
                      },
                      {
                        path: '/vab/statistic',
                        name: 'statistic',
                        meta: {
                          title: '统计数值',
                          type: 'menu'
                        },
                        component: 'vab/statistic'
                      },
                      {
                        path: '/vab/video',
                        name: 'scvideo',
                        meta: {
                          title: '视频播放器',
                          type: 'menu'
                        },
                        component: 'vab/video'
                      },
                      {
                        path: '/vab/qrcode',
                        name: 'qrcode',
                        meta: {
                          title: '二维码',
                          type: 'menu'
                        },
                        component: 'vab/qrcode'
                      }
                    ]
                  },
                  {
                    path: '/vab/form',
                    name: 'vabform',
                    meta: {
                      title: 'Form 数据录入',
                      icon: 'el-icon-edit',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: '/vab/tableselect',
                        name: 'tableselect',
                        meta: {
                          title: '表格选择器',
                          type: 'menu'
                        },
                        component: 'vab/tableselect'
                      },
                      {
                        path: '/vab/formtable',
                        name: 'formtable',
                        meta: {
                          title: '表单表格',
                          type: 'menu'
                        },
                        component: 'vab/formtable'
                      },
                      {
                        path: '/vab/selectFilter',
                        name: 'selectFilter',
                        meta: {
                          title: '分类筛选器',
                          type: 'menu'
                        },
                        component: 'vab/selectFilter'
                      },
                      {
                        path: '/vab/filterbar',
                        name: 'filterBar',
                        meta: {
                          title: '过滤器v2',
                          type: 'menu'
                        },
                        component: 'vab/filterBar'
                      },
                      {
                        path: '/vab/upload',
                        name: 'upload',
                        meta: {
                          title: '上传',
                          type: 'menu'
                        },
                        component: 'vab/upload'
                      },
                      {
                        path: '/vab/select',
                        name: 'scselect',
                        meta: {
                          title: '异步选择器',
                          type: 'menu'
                        },
                        component: 'vab/select'
                      },
                      {
                        path: '/vab/iconselect',
                        name: 'iconSelect',
                        meta: {
                          title: '图标选择器',
                          type: 'menu'
                        },
                        component: 'vab/iconselect'
                      },
                      {
                        path: '/vab/cron',
                        name: 'cron',
                        meta: {
                          title: 'Cron规则生成器',
                          type: 'menu'
                        },
                        component: 'vab/cron'
                      },
                      {
                        path: '/vab/editor',
                        name: 'editor',
                        meta: {
                          title: '富文本编辑器',
                          type: 'menu'
                        },
                        component: 'vab/editor'
                      },
                      {
                        path: '/vab/codeeditor',
                        name: 'codeeditor',
                        meta: {
                          title: '代码编辑器',
                          type: 'menu'
                        },
                        component: 'vab/codeeditor'
                      }
                    ]
                  },
                  {
                    path: '/vab/feedback',
                    name: 'vabfeedback',
                    meta: {
                      title: 'Feedback 反馈',
                      icon: 'el-icon-mouse',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: '/vab/drag',
                        name: 'drag',
                        meta: {
                          title: '拖拽排序',
                          type: 'menu'
                        },
                        component: 'vab/drag'
                      },
                      {
                        path: '/vab/contextmenu',
                        name: 'contextmenu',
                        meta: {
                          title: '右键菜单',
                          type: 'menu'
                        },
                        component: 'vab/contextmenu'
                      },
                      {
                        path: '/vab/cropper',
                        name: 'cropper',
                        meta: {
                          title: '图像剪裁',
                          type: 'menu'
                        },
                        component: 'vab/cropper'
                      },
                      {
                        path: '/vab/fileselect',
                        name: 'fileselect',
                        meta: {
                          title: '资源库选择器(弃用)',
                          type: 'menu'
                        },
                        component: 'vab/fileselect'
                      },
                      {
                        path: '/vab/dialog',
                        name: 'dialogExtend',
                        meta: {
                          title: '弹窗扩展',
                          type: 'menu'
                        },
                        component: 'vab/dialog'
                      }
                    ]
                  },
                  {
                    path: '/vab/others',
                    name: 'vabothers',
                    meta: {
                      title: 'Others 其他',
                      icon: 'el-icon-more-filled',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: '/vab/print',
                        name: 'print',
                        meta: {
                          title: '打印',
                          type: 'menu'
                        },
                        component: 'vab/print'
                      },
                      {
                        path: '/vab/watermark',
                        name: 'watermark',
                        meta: {
                          title: '水印',
                          type: 'menu'
                        },
                        component: 'vab/watermark'
                      },
                      {
                        path: '/vab/importexport',
                        name: 'importexport',
                        meta: {
                          title: '文件导出导入',
                          type: 'menu'
                        },
                        component: 'vab/importexport'
                      }
                    ]
                  },
                  {
                    path: '/vab/list',
                    name: 'list',
                    meta: {
                      title: 'Table 数据列表',
                      icon: 'el-icon-fold',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: '/vab/table/base',
                        name: 'tableBase',
                        meta: {
                          title: '基础数据列表',
                          type: 'menu'
                        },
                        component: 'vab/table/base'
                      },
                      {
                        path: '/vab/table/thead',
                        name: 'tableThead',
                        meta: {
                          title: '多级表头',
                          type: 'menu'
                        },
                        component: 'vab/table/thead'
                      },
                      {
                        path: '/vab/table/column',
                        name: 'tableCustomColumn',
                        meta: {
                          title: '动态列',
                          type: 'menu'
                        },
                        component: 'vab/table/column'
                      },
                      {
                        path: '/vab/table/remote',
                        name: 'tableRemote',
                        meta: {
                          title: '远程排序过滤',
                          type: 'menu'
                        },
                        component: 'vab/table/remote'
                      }
                    ]
                  },
                  {
                    path: '/vab/workflow',
                    name: 'workflow',
                    meta: {
                      title: '工作流设计器',
                      icon: 'el-icon-share',
                      type: 'menu'
                    },
                    component: 'vab/workflow'
                  },
                  {
                    path: '/vab/formrender',
                    name: 'formRender',
                    meta: {
                      title: '动态表单(Beta)',
                      icon: 'el-icon-message-box',
                      type: 'menu'
                    },
                    component: 'vab/form'
                  }
                ]
              },
              {
                name: 'template',
                path: '/template',
                meta: {
                  title: '模板',
                  icon: 'el-icon-files',
                  type: 'menu'
                },
                children: [
                  {
                    path: '/template/layout',
                    name: 'layoutTemplate',
                    meta: {
                      title: '布局',
                      icon: 'el-icon-grid',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: '/template/layout/blank',
                        name: 'blank',
                        meta: {
                          title: '空白模板',
                          type: 'menu'
                        },
                        component: 'template/layout/blank'
                      },
                      {
                        path: '/template/layout/layoutTCB',
                        name: 'layoutTCB',
                        meta: {
                          title: '上中下布局',
                          type: 'menu'
                        },
                        component: 'template/layout/layoutTCB'
                      },
                      {
                        path: '/template/layout/layoutLCR',
                        name: 'layoutLCR',
                        meta: {
                          title: '左中右布局',
                          type: 'menu'
                        },
                        component: 'template/layout/layoutLCR'
                      }
                    ]
                  },
                  {
                    path: '/template/list',
                    name: 'list',
                    meta: {
                      title: '列表',
                      icon: 'el-icon-document',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: '/template/list/crud',
                        name: 'listCrud',
                        meta: {
                          title: 'CRUD',
                          type: 'menu'
                        },
                        component: 'template/list/crud',
                        children: [
                          {
                            path: '/template/list/crud/detail/:id?',
                            name: 'listCrud-detail',
                            meta: {
                              title: '新增/编辑',
                              hidden: true,
                              active: '/template/list/crud',
                              type: 'menu'
                            },
                            component: 'template/list/crud/detail'
                          }
                        ]
                      },
                      {
                        path: '/template/list/tree',
                        name: 'listTree',
                        meta: {
                          title: '左树右表',
                          type: 'menu'
                        },
                        component: 'template/list/tree'
                      },
                      {
                        path: '/template/list/tab',
                        name: 'listTab',
                        meta: {
                          title: '分类表格',
                          type: 'menu'
                        },
                        component: 'template/list/tab'
                      },
                      {
                        path: '/template/list/son',
                        name: 'listSon',
                        meta: {
                          title: '子母表',
                          type: 'menu'
                        },
                        component: 'template/list/son'
                      },
                      {
                        path: '/template/list/widthlist',
                        name: 'widthlist',
                        meta: {
                          title: '定宽列表',
                          type: 'menu'
                        },
                        component: 'template/list/width'
                      }
                    ]
                  },
                  {
                    path: '/template/other',
                    name: 'other',
                    meta: {
                      title: '其他',
                      icon: 'el-icon-folder',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: '/template/other/stepform',
                        name: 'stepform',
                        meta: {
                          title: '分步表单',
                          type: 'menu'
                        },
                        component: 'template/other/stepform'
                      }
                    ]
                  }
                ]
              },
              {
                name: 'other',
                path: '/other',
                meta: {
                  title: '其他',
                  icon: 'el-icon-more-filled',
                  type: 'menu'
                },
                children: [
                  {
                    path: '/other/directive',
                    name: 'directive',
                    meta: {
                      title: '指令',
                      icon: 'el-icon-price-tag',
                      type: 'menu'
                    },
                    component: 'other/directive'
                  },
                  {
                    path: '/other/viewTags',
                    name: 'viewTags',
                    meta: {
                      title: '标签操作',
                      icon: 'el-icon-files',
                      type: 'menu'
                    },
                    component: 'other/viewTags',
                    children: [
                      {
                        path: '/other/fullpage',
                        name: 'fullpage',
                        meta: {
                          title: '整页路由',
                          icon: 'el-icon-monitor',
                          fullpage: true,
                          hidden: true,
                          type: 'menu'
                        },
                        component: 'other/fullpage'
                      }
                    ]
                  },
                  {
                    path: '/other/verificate',
                    name: 'verificate',
                    meta: {
                      title: '表单验证',
                      icon: 'el-icon-open',
                      type: 'menu'
                    },
                    component: 'other/verificate'
                  },
                  {
                    path: '/other/loadJS',
                    name: 'loadJS',
                    meta: {
                      title: '异步加载JS',
                      icon: 'el-icon-location-information',
                      type: 'menu'
                    },
                    component: 'other/loadJS'
                  },
                  {
                    path: '/link',
                    name: 'link',
                    meta: {
                      title: '外部链接',
                      icon: 'el-icon-link',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: 'https://baidu.com',
                        name: '百度',
                        meta: {
                          title: '百度',
                          type: 'link'
                        }
                      },
                      {
                        path: 'https://www.google.cn',
                        name: '谷歌',
                        meta: {
                          title: '谷歌',
                          type: 'link'
                        }
                      }
                    ]
                  },
                  {
                    path: '/iframe',
                    name: 'Iframe',
                    meta: {
                      title: 'Iframe',
                      icon: 'el-icon-position',
                      type: 'menu'
                    },
                    children: [
                      {
                        path: 'https://v3.cn.vuejs.org',
                        name: 'vue3',
                        meta: {
                          title: 'VUE 3',
                          type: 'iframe'
                        }
                      },
                      {
                        path: 'https://element-plus.gitee.io',
                        name: 'elementplus',
                        meta: {
                          title: 'Element Plus',
                          type: 'iframe'
                        }
                      },
                      {
                        path: 'https://lolicode.gitee.io/scui-doc',
                        name: 'scuidoc',
                        meta: {
                          title: 'SCUI文档',
                          type: 'iframe'
                        }
                      }
                    ]
                  }
                ]
              },
              {
                name: 'test',
                path: '/test',
                meta: {
                  title: '实验室',
                  icon: 'el-icon-mouse',
                  type: 'menu'
                },
                children: [
                  {
                    path: '/test/autocode',
                    name: 'autocode',
                    meta: {
                      title: '代码生成器',
                      icon: 'sc-icon-code',
                      type: 'menu'
                    },
                    component: 'test/autocode',
                    children: [
                      {
                        path: '/test/autocode/table',
                        name: 'autocode-table',
                        meta: {
                          title: 'CRUD代码生成',
                          hidden: true,
                          active: '/test/autocode',
                          type: 'menu'
                        },
                        component: 'test/autocode/table'
                      }
                    ]
                  },
                  {
                    path: '/test/codebug',
                    name: 'codebug',
                    meta: {
                      title: '异常处理',
                      icon: 'sc-icon-bug-line',
                      type: 'menu'
                    },
                    component: 'test/codebug'
                  }
                ]
              },
              {
                name: 'setting',
                path: '/setting',
                meta: {
                  title: '配置',
                  icon: 'el-icon-setting',
                  type: 'menu'
                },
                children: [
                  {
                    path: '/setting/system',
                    name: 'system',
                    meta: {
                      title: '系统设置',
                      icon: 'el-icon-tools',
                      type: 'menu'
                    },
                    component: 'setting/system'
                  },
                  {
                    path: '/setting/user',
                    name: 'user',
                    meta: {
                      title: '用户管理',
                      icon: 'el-icon-user-filled',
                      type: 'menu'
                    },
                    component: 'setting/user'
                  },
                  {
                    path: '/setting/role',
                    name: 'role',
                    meta: {
                      title: '角色管理',
                      icon: 'el-icon-notebook',
                      type: 'menu'
                    },
                    component: 'setting/role'
                  },
                  {
                    path: '/setting/dept',
                    name: 'dept',
                    meta: {
                      title: '部门管理',
                      icon: 'sc-icon-organization',
                      type: 'menu'
                    },
                    component: 'setting/dept'
                  },
                  {
                    path: '/setting/dic',
                    name: 'dic',
                    meta: {
                      title: '字典管理',
                      icon: 'el-icon-document',
                      type: 'menu'
                    },
                    component: 'setting/dic'
                  },
                  {
                    path: '/setting/table',
                    name: 'tableSetting',
                    meta: {
                      title: '表格列管理',
                      icon: 'el-icon-scale-to-original',
                      type: 'menu'
                    },
                    component: 'setting/table'
                  },
                  {
                    path: '/setting/menu',
                    name: 'settingMenu',
                    meta: {
                      title: '菜单管理',
                      icon: 'el-icon-fold',
                      type: 'menu'
                    },
                    component: 'setting/menu'
                  },
                  {
                    path: '/setting/task',
                    name: 'task',
                    meta: {
                      title: '计划任务',
                      icon: 'el-icon-alarm-clock',
                      type: 'menu'
                    },
                    component: 'setting/task'
                  },
                  {
                    path: '/setting/client',
                    name: 'client',
                    meta: {
                      title: '应用管理',
                      icon: 'el-icon-help-filled',
                      type: 'menu'
                    },
                    component: 'setting/client'
                  },
                  {
                    path: '/setting/log',
                    name: 'log',
                    meta: {
                      title: '系统日志',
                      icon: 'el-icon-warning',
                      type: 'menu'
                    },
                    component: 'setting/log'
                  }
                ]
              },

              {
                path: '/other/about',
                name: 'about',
                meta: {
                  title: '关于',
                  icon: 'el-icon-info-filled',
                  type: 'menu'
                },
                component: 'other/about'
              }
            ],
            permissions: [
              'list.add',
              'list.edit',
              'list.delete',
              'user.add',
              'user.edit',
              'user.delete'
            ],
            dashboardGrid: ['welcome', 'ver', 'time', 'progress', 'echarts', 'about']
          },
          message: ''
        }
        //  return await http.get(this.url)
      }
    },
    list: {
      url: `${config.API_URL}/system/menu/list`,
      name: '获取菜单',
      get: async function () {
        return {
          code: 200,
          data: [
            {
              id: '00001',
              parentId: null,
              name: 'system',
              path: '/system',
              meta: {
                title: '系统',
                icon: 'el-icon-setting',
                type: 'menu'
              },
              apiList: [
                {
                  code: 'system.list',
                  url: '/api/system/list'
                }
              ],
              component: '',
              children: [
                {
                  id: '00001001',
                  parentId: '00001',
                  name: 'user',
                  path: '/system/user',
                  meta: {
                    title: '用户管理',
                    icon: 'el-icon-setting',
                    type: 'menu'
                  },
                  component: '',
                  children: [
                    {
                      id: '00001001001',
                      parentId: '00001001',
                      name: 'user.add',
                      meta: {
                        title: '新增',
                        type: 'button'
                      }
                    },
                    {
                      id: '00001001002',
                      parentId: '00001001',
                      name: 'user.edit',
                      meta: {
                        title: '编辑',
                        type: 'button'
                      }
                    },
                    {
                      id: '00001001003',
                      parentId: '00001001',
                      name: 'user.del',
                      meta: {
                        title: '删除',
                        type: 'button'
                      }
                    }
                  ]
                }
              ]
            },
            {
              id: '00002',
              parentId: null,
              name: 'other',
              path: '/other',
              meta: {
                title: '其他',
                icon: 'el-icon-more',
                type: 'menu'
              },
              component: '',
              children: [
                {
                  id: '00002001',
                  parentId: '00002',
                  name: 'directive',
                  path: '/other/directive',
                  meta: {
                    title: '指令',
                    icon: 'el-icon-price-tag',
                    type: 'menu'
                  },
                  component: '',
                  children: [
                    {
                      id: '00002001001',
                      parentId: '00002001',
                      name: 'directive.add',
                      meta: {
                        title: '新增',
                        type: 'button'
                      }
                    },
                    {
                      id: '00002001002',
                      parentId: '00002001',
                      name: 'directive.edit',
                      meta: {
                        title: '编辑',
                        type: 'button'
                      }
                    },
                    {
                      id: '00002001003',
                      parentId: '00002001',
                      name: 'directive.del',
                      meta: {
                        title: '删除',
                        type: 'button'
                      }
                    }
                  ]
                }
              ]
            }
          ],
          message: ''
        }
        //return await http.get(this.url)
      }
    }
  },
  dic: {
    tree: {
      url: `${config.API_URL}/system/dic/tree`,
      name: '获取字典树',
      get: async function () {
        return {
          code: 200,
          data: [
            {
              id: '1',
              code: 'notice',
              name: '通知类型'
            },
            {
              id: '2',
              code: 'sex',
              name: '性别'
            },
            {
              id: '3',
              code: 'menuCategory',
              name: '菜单类型'
            },
            {
              id: '4',
              code: 'userType',
              name: '用户类型',
              children: [
                {
                  id: '41',
                  code: 'userTypePC',
                  name: 'Desktop'
                },
                {
                  id: '42',
                  code: 'userTypeAPP',
                  name: 'Mobile'
                }
              ]
            }
          ],
          message: ''
        }
        // return await http.get(this.url)
      }
    },
    list: {
      url: `${config.API_URL}/system/dic/list`,
      name: '字典明细',
      get: async function (params) {
        return {
          code: 200,
          data: {
            total: 3,
            page: 1,
            pageSize: 20,
            rows: [
              {
                id: '100',
                key: '1',
                name: '发布通知',
                dic: '1',
                yx: '1'
              },
              {
                id: '102',
                key: '2',
                name: '转发通知',
                dic: '1',
                yx: '1'
              },
              {
                id: '105',
                key: '3',
                name: '事务通知',
                dic: '1',
                yx: '0'
              }
            ]
          },
          message: ''
        }
        //return await http.get(this.url, params)
      }
    },
    get: {
      url: `${config.API_URL}/system/dic/get`,
      name: '获取字典数据',
      get: async function (params) {
        return await http.get(this.url, params)
      }
    }
  },
  role: {
    list: {
      url: `${config.API_URL}/system/role/list2`,
      name: '获取角色列表',
      get: async function (params) {
        return {
          code: 200,
          data: {
            total: 2,
            page: 1,
            pageSize: 20,
            rows: [
              {
                id: '1',
                label: '超级管理员',
                alias: 'SA',
                sort: 1,
                status: '1',
                remark: '内置超级管理员角色',
                date: '2020-05-07 09:30:00'
              },
              {
                id: '2',
                label: '业务管理员',
                alias: 'Business Administrator',
                sort: 2,
                status: '1',
                remark: '',
                date: '2020-05-07 09:30:00'
              },
              {
                id: '3',
                label: '文章管理员',
                alias: 'Article administrator',
                sort: 3,
                status: '0',
                remark: '',
                date: '2020-05-07 09:30:00'
              },
              {
                id: '4',
                label: '发布人员',
                alias: 'publish',
                sort: 4,
                status: '1',
                remark: '',
                date: '2020-05-07 09:30:00'
              }
            ]
          },
          message: ''
        }
        // return await http.get(this.url, params)
      }
    }
  },
  dept: {
    list: {
      url: `${config.API_URL}/system/dept/list`,
      name: '获取部门列表',
      get: async function (params) {
        // return await http.get(this.url, params)
        return {
          code: 200,
          data: [
            {
              id: '1',
              parentId: '0',
              label: '华南分部',
              date: '2022-10-10 08:00:00',
              remark: '',
              status: 1,
              sort: 1,
              children: [
                {
                  id: '11',
                  parentId: '1',
                  label: '售前客服部',
                  date: '2022-10-10 08:00:00',
                  remark: '',
                  status: 1,
                  sort: 2
                },
                {
                  id: '12',
                  parentId: '1',
                  label: '技术研发部',
                  date: '2022-10-10 08:00:00',
                  remark: '软件开发&测试',
                  status: 0,
                  sort: 3
                }
              ]
            },
            {
              id: '2',
              parentId: '0',
              label: '华东分部',
              date: '2022-10-10 08:00:00',
              remark: '',
              status: 1,
              sort: 4,
              children: [
                {
                  id: '21',
                  parentId: '2',
                  label: '售前客服部',
                  date: '2022-10-10 08:00:00',
                  remark: '',
                  status: 1,
                  sort: 5
                },
                {
                  id: '22',
                  parentId: '2',
                  label: '技术研发部',
                  date: '2022-10-10 08:00:00',
                  remark: '',
                  status: 1,
                  sort: 6
                }
              ]
            }
          ],
          message: ''
        }
      }
    }
  },
  user: {
    list: {
      url: `${config.API_URL}/system/user/list`,
      name: '获取用户列表',
      get: async function (params) {
        // return await http.get(this.url, params)
        return {
          code: 200,
          data: {
            total: 2,
            page: 1,
            pageSize: 20,
            summary: {
              id: '20',
              name: '999'
            },
            rows: [
              {
                id: '100',
                userName: 'sakuya',
                avatar: 'img/avatar.jpg',
                mail: '81883387@qq.com',
                name: 'sakuya',
                group: ['1'],
                groupName: '超级管理员',
                dept: '11',
                date: '2021-10-10 12:00:00'
              },
              {
                id: '101',
                userName: 'luhkpev',
                avatar: 'img/avatar3.gif',
                mail: 'k.luhkpev@zdgtfd.ma',
                name: 'John Martinez',
                group: ['2', '4'],
                groupName: '业务管理员,发布人员',
                dept: '22',
                date: '2021-02-21 14:21:48'
              }
            ]
          },
          message: ''
        }
      }
    }
  },
  app: {
    list: {
      url: `${config.API_URL}/system/app/list`,
      name: '应用列表',
      get: async function () {
        //return await http.get(this.url)
        return {
          code: 200,
          data: {
            total: 2,
            page: 1,
            pageSize: 20,
            rows: [
              {
                id: '100',
                appName: '自助机',
                appId: 'selfHelp',
                secret: 'YuOju6lP3t4thLbZOhRSV4UZ79vdnwIC',
                type: ['ALL'],
                exp: '2035-01-01 00:00:00'
              },
              {
                id: '101',
                appName: '微信小程序',
                appId: 'WechatApp',
                secret: 'WgBbsRtCeXiNXIYkkShxxvqOGrAYKK2e',
                type: ['UPDATA', 'QUERY'],
                exp: '2023-06-01 00:00:00'
              }
            ]
          },
          message: ''
        }
      }
    }
  },
  log: {
    list: {
      url: `${config.API_URL}/system/log/list`,
      name: '日志列表',
      get: async function (params) {
        // return await http.get(this.url, params)
        return {
          code: 200,
          data: {
            total: 85060,
            page: 1,
            pageSize: 20,
            rows: [
              {
                id: '450000197603161299',
                level: 'error',
                name: '用户登录',
                url: '/oauth/token',
                type: 'POST',
                code: '500',
                cip: '158.121.28.12',
                user: '邱刚',
                time: '1971-09-20 13:56:42'
              },
              {
                id: '450000199903092802',
                level: 'error',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '83.162.110.114',
                user: '杨丽',
                time: '1994-11-17 03:24:21'
              },
              {
                id: '820000199902022609',
                level: 'warn',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '188.28.143.225',
                user: '彭磊',
                time: '1977-11-17 15:04:13'
              },
              {
                id: '230000197810286608',
                level: 'info',
                name: '用户登录',
                url: '/oauth/token',
                type: 'POST',
                code: '401',
                cip: '35.146.6.81',
                user: '郝军',
                time: '1975-10-19 04:25:43'
              },
              {
                id: '370000202303271131',
                level: 'error',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '150.247.88.162',
                user: '顾芳',
                time: '1983-01-20 11:33:38'
              },
              {
                id: '460000197601294313',
                level: 'info',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '133.55.33.53',
                user: '于明',
                time: '1986-11-07 01:21:50'
              },
              {
                id: '340000198812122420',
                level: 'info',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '133.49.249.206',
                user: '刘洋',
                time: '1996-01-26 15:54:11'
              },
              {
                id: '520000197709212849',
                level: 'error',
                name: '用户登录',
                url: '/oauth/token',
                type: 'POST',
                code: '500',
                cip: '133.109.38.37',
                user: '顾霞',
                time: '1999-09-28 02:10:36'
              },
              {
                id: '350000199512083163',
                level: 'warn',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '195.128.189.11',
                user: '龚娟',
                time: '1983-04-02 20:43:31'
              },
              {
                id: '810000197803302145',
                level: 'info',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '26.28.113.43',
                user: '钱洋',
                time: '1978-07-09 09:31:28'
              },
              {
                id: '220000199404081321',
                level: 'warn',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '401',
                cip: '181.167.163.36',
                user: '段勇',
                time: '2001-11-15 13:59:57'
              },
              {
                id: '110000198411100543',
                level: 'info',
                name: '用户登录',
                url: '/oauth/token',
                type: 'POST',
                code: '401',
                cip: '236.121.109.0',
                user: '谢超',
                time: '1977-05-11 00:28:37'
              },
              {
                id: '630000199210116158',
                level: 'warn',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '401',
                cip: '135.165.146.80',
                user: '傅超',
                time: '2018-10-03 09:32:39'
              },
              {
                id: '500000201003189275',
                level: 'warn',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '194.16.50.136',
                user: '戴桂英',
                time: '2007-10-05 14:36:07'
              },
              {
                id: '420000198210227743',
                level: 'warn',
                name: '用户登录',
                url: '/oauth/token',
                type: 'POST',
                code: '200',
                cip: '191.168.29.90',
                user: '赵芳',
                time: '1990-01-25 01:30:53'
              },
              {
                id: '410000197609126585',
                level: 'error',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '200',
                cip: '204.73.163.48',
                user: '张强',
                time: '2007-07-02 10:51:06'
              },
              {
                id: '220000197411072360',
                level: 'info',
                name: '用户登录',
                url: '/oauth/token',
                type: 'POST',
                code: '500',
                cip: '40.157.85.142',
                user: '姜刚',
                time: '2010-07-31 15:53:16'
              },
              {
                id: '410000198606056539',
                level: 'warn',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '200',
                cip: '199.115.201.160',
                user: '郑秀英',
                time: '2007-07-19 06:35:35'
              },
              {
                id: '210000200204097357',
                level: 'info',
                name: '用户登录',
                url: '/oauth/token',
                type: 'GET',
                code: '500',
                cip: '20.185.227.90',
                user: '戴刚',
                time: '1987-07-12 23:56:43'
              },
              {
                id: '430000198103280663',
                level: 'info',
                name: '用户登录',
                url: '/oauth/token',
                type: 'POST',
                code: '500',
                cip: '197.163.215.244',
                user: '蒋涛',
                time: '2019-04-08 07:19:52'
              }
            ]
          },
          message: ''
        }
      }
    }
  },
  table: {
    list: {
      url: `${config.API_URL}/system/table/list`,
      name: '表格列管理列表',
      get: async function (params) {
        //return await http.get(this.url, params)
        return {
          code: 200,
          data: {
            total: 2,
            page: 1,
            pageSize: 20,
            rows: [
              {
                id: '1',
                name: '用户列表',
                code: 'userList'
              }
            ]
          },
          message: ''
        }
      }
    },
    info: {
      url: `${config.API_URL}/system/table/info`,
      name: '表格列管理详情',
      get: async function (params) {
        // return await http.get(this.url, params)

        return {
          code: 200,
          data: {
            id: '1',
            name: '用户列表',
            code: 'userList',
            remoteSort: true,
            remoteFilter: true,
            column: [
              {
                label: 'ID',
                prop: 'id',
                width: '80',
                hide: true,
                sortable: false,
                fixed: false,
                filters: []
              },
              {
                label: '头像',
                prop: 'avatar',
                width: '80',
                hide: false,
                sortable: false,
                fixed: false,
                filter: true,
                filters: [
                  {
                    text: '未上传',
                    value: '0'
                  },
                  {
                    text: '已上传',
                    value: '1'
                  }
                ]
              },
              {
                label: '登录账号',
                prop: 'userName',
                width: '150',
                hide: false,
                sortable: false,
                fixed: false,
                filters: []
              },
              {
                label: '姓名',
                prop: 'name',
                width: '150',
                hide: false,
                sortable: false,
                fixed: false,
                filters: []
              },
              {
                label: '加入时间',
                prop: 'date',
                width: '150',
                hide: false,
                sortable: false,
                fixed: false,
                filters: []
              }
            ]
          },
          message: ''
        }
      }
    }
  },
  tasks: {
    list: {
      url: `${config.API_URL}/system/tasks/list`,
      name: '系统任务管理',
      get: async function (params) {
        //return await http.get(this.url, params)

        return {
          code: 200,
          data: [
            {
              id: '100',
              taskName: '年度报表生成',
              type: 'report',
              result: '',
              state: '0',
              stateName: '执行中',
              createDate: '2022-06-13 17:04:55'
            },
            {
              id: '101',
              taskName: '系统日志导出',
              type: 'export',
              result: 'http://www.baidu.com',
              state: '1',
              stateName: '完成',
              createDate: '2022-06-12 09:31:08'
            }
          ],
          message: ''
        }
      }
    }
  }
}
